home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / ASTRNOMY / DE118I.ZIP / SETPREC.688 < prev    next >
Text File  |  1993-03-05  |  824b  |  36 lines

  1. /* Set 68881/2 floating point rounding precision */
  2. /* Reference: MC68881/MC68882 Floating-Point Coprocessor */
  3. /* User's Manual, Motorola, Prentice-Hall, 1987 (First Edition) */
  4. /* Pages 1-14, 2-3, 4-68. */
  5. /* FPcr code $80 sets the 68882 coprocessor to */
  6. /*    rounding precision = 53 bits */
  7. /*    rounding mode = nearest or even */
  8. /*    all exceptions (bits 8-15) disabled */
  9. /* The instruction is */
  10. /*    FMOVE.L    #$80,Fcr */
  11. /* if the assembler will understand it. */
  12.  
  13.     .align 2
  14. .text
  15.  
  16. /* set to single precision */
  17. .globl _sprec
  18. _sprec
  19.     .word 0xf23c,0x9000,0x0000,0x0040
  20.     rts
  21.  
  22. /* set to double precision */
  23. .globl _dprec
  24.  
  25. _dprec:
  26.     .word    0xf23c,0x9000,0x0000,0x0080
  27.     rts
  28.  
  29. /* set to extended (long double) precision */
  30. .globl _ldprec
  31.  
  32. _ldprec:
  33.     .word    0xf23c,0x9000,0x0000,0x0000
  34.     rts
  35.  
  36.